-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some refactoring in the base class #18
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please see my comments.
…ter errors, as well as fixed a bug in the distributed processing. Removed portpicker as a dependency as it can't be used for multi-process computations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please see my comments.
examples/CFD/windtunnel3d.py
Outdated
@@ -109,7 +110,7 @@ def output_data(self, **kwargs): | |||
|
|||
if __name__ == '__main__': | |||
precision = 'f32/f32' | |||
lattice = LatticeD3Q27(precision) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be D3Q27 not D3Q19
src/base.py
Outdated
if self.nz == 0 and not isinstance(value, LatticeD2Q9): | ||
raise ValueError("For 2D simulations, lattice type must be LatticeD2Q9.") | ||
if self.nz != 0 and isinstance(self, src.models.KBCSim) and not isinstance(value, LatticeD3Q27): | ||
raise ValueError("For 3D KBC simulations, lattice type must be LatticeD3Q19,") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message is incorrect. The lattice myst be D3Q27. Also I would not include this check that relyes on model specific information (KBCSim here) inside the base class. You should raise an error inside models.py for KBCSim
src/base.py
Outdated
def lattice(self, value): | ||
if value is None: | ||
raise ValueError("Lattice type must be provided.") | ||
if self.nz == 0 and not isinstance(value, LatticeD2Q9): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not "assume" any default lattice for 2D scenarios. We can still assume D2Q9 for 2D flows and D3Q27 for 3D flows for ALL cases as the default setting when no lattice input is defined by the user.
All comments are addressed. |
No description provided.